<%@ page language="java" import="java.sql.*" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body background="images/modify.jpg">
</center>
<%
Connection con = null;
Statement st = null;
ResultSet rs =null;
try{
	Class.forName("com.mysql.jdbc.Driver");
	con = DriverManager.getConnection("jdbc:mysql://localhost:3306/1","root","lishanshan");
	st = con.createStatement();
	String a=request.getParameter("label1");
	String b=request.getParameter("identity1");
	String label=(String)request.getAttribute("label");
	String identity =(String)request.getAttribute("identity");
	rs = st.executeQuery("select * from person where  label='"+a+"' and identity='"+b+"'");
%>
<a href="main.jsp">返回主页</a>
<br/>
<br/>
<table border="1" width="100%" cellpadding ="2" cellspacing="1">
<tr>
<td>预案名称</td>
<td>发布时间</td>
<td align="center" width="80%">预案内容</td>
</tr>
<%
while(rs.next()){
	String name = rs.getString("name");
	Date birthday = rs.getDate("birthday");
	String descriptions = rs.getString("descriptions");
	out.println("<tr>");
	%>
	<% 
	out.println("<td>"+name+"</td>");
	out.println("<td>"+birthday+"</td>");
	out.println("<td width=80>"+descriptions+"</td>");
	

out.println("</tr>");
}
%>
</table>
<%
}catch(SQLException e){
	e.printStackTrace();
}finally{
	try{
		rs.close();
		st.close();
		con.close();
	}catch (SQLException e){
		e.printStackTrace();
	}
}%>
</body>
</html>